package com.cm.projectx.common;

import java.io.Serializable;
import java.util.List;

/**
 * 分页信息
 *
 */
public class PageInfo<T> implements Serializable {

    /**
     * 当前记录起始索引
     */
    private int current;

    /**
     * 每页显示记录数
     */
    private int size;

    /**
     * 显示记录总数
     */
    private long total;

    /**
     * 分页数据
     */
    private List<T> data;

    public PageInfo() {
    }

    public PageInfo(int current, int size) {
        this.current = current;
        this.size = size;
    }

    public PageInfo(int current, int size, long total, List<T> data) {
        this.current = current;
        this.size = size;
        this.total = total;
        this.data = data;
    }

    public int getCurrent() {
        return current;
    }

    public void setCurrent(int current) {
        this.current = current;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}

